import request from '@/utils/request'
import { LoginRequest, LoginResponse, RegisterRequest} from '@/types/login'

// 登录
export async function login(requestData: LoginRequest): Promise<LoginResponse> {
    const response = await request.post<LoginResponse>('/wx/user/login', requestData)
    return response.data // 返回响应数据
}

// 注册
export async function register(requestData: RegisterRequest): Promise<any> {
    const response = await request.post<any>('/wx/user/register', requestData)
    return response.data // 返回响应数据
}
